const app = getApp();
import Api from '@/services/api.js'
export default {
  data() {
    return {
      list: [],
    }
  },
  computed: {
  },
  async onLoad() {
    this.getOrderList();
  },
  methods: {
    async getOrderList() {
      const { code, result } = await this.$request({
        url: Api.getOrderList,
        data: {
          type: '2'
        }
      })
      if (code === 200) {
        this.list = result.map(i => {
          i.vip = JSON.parse(i.msg || '{}').vip;
          console.log('===========>', i.vip);
          return i;
        });
      }
    }
  },
  async onPullDownRefresh() {
    this.getOrderList();
    uni.stopPullDownRefresh();
  }
}